package com.yanqu.road.entity.servercenter;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

@FieldTypeAnnotation(tableName = "t_s_server_list")
public class ServerInfo extends DataObject {

	@FieldTypeAnnotation(select = true, update = true)
	private long serverId;

	private String serverName;

	private String gameServerUrl;

	private String webServerUrl;

	private long openTime;

	@FieldTypeAnnotation(select = true, update = true)
	private int channelId;

	private boolean open;

	@FieldTypeAnnotation
	private int state;

	private String wsIndex;

	private String dbIndex;

	private int maxOnlineCount = 1000;

	private boolean openLoginQueue = false;

	private String clientVerCode = "";

	private int accessPhonePlatform;         //接入手机平台，0：全部；1：安卓；2：ios

	private int serverType;                  //服务器类型，0：普通服；1：提审服；2：测试服

	private String markStr; // 服务器标签

	private boolean openSplitFlow;

	private int registerLimit;

	private int openZsDay;        //招商开启天数（开服后）

	private boolean createRoleLimit;

	private boolean createPreRoleOpen;

	private int createPreRoleNum;

	private int preRoleNum;

	//0: 普通；1:九龙；2：小当家；3：盗墓笔记；4：甄嬛2.0
	private int specialServer;

	private int createRoleCountLimit;

	private int specialServerParam;

	public long getServerId() {
		return serverId;
	}

	public void setServerId(long serverId) {
		this.serverId = serverId;
	}

	public String getServerName() {
		return serverName;
	}

	public void setServerName(String serverName) {
		this.serverName = serverName;
	}

	public String getGameServerUrl() {
		return gameServerUrl;
	}

	public void setGameServerUrl(String gameServerUrl) {
		this.gameServerUrl = gameServerUrl;
	}

	public String getWebServerUrl() {
		return webServerUrl;
	}

	public void setWebServerUrl(String webServerUrl) {
		this.webServerUrl = webServerUrl;
	}

	public int getChannelId() {
		return channelId;
	}

	public void setChannelId(int channelId) {
		this.channelId = channelId;
	}

	public long getOpenTime() {
		return openTime;
	}

	public void setOpenTime(long openTime) {
		this.openTime = openTime;
	}

	public boolean isOpen() {
		return open;
	}

	public void setOpen(boolean open) {
		this.open = open;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getWsIndex() {
		return wsIndex;
	}

	public void setWsIndex(String wsIndex) {
		this.wsIndex = wsIndex;
	}

	public String getDbIndex() {
		return dbIndex;
	}

	public void setDbIndex(String dbIndex) {
		this.dbIndex = dbIndex;
	}

	public int getMaxOnlineCount() {
		return maxOnlineCount;
	}

	public void setMaxOnlineCount(int maxOnlineCount) {
		if(maxOnlineCount>0){
			this.maxOnlineCount = maxOnlineCount;
		}
	}

	public boolean isOpenLoginQueue() {
		return openLoginQueue;
	}

	public void setOpenLoginQueue(boolean openLoginQueue) {
		this.openLoginQueue = openLoginQueue;
	}

	public String getClientVerCode() {
		return clientVerCode;
	}

	public void setClientVerCode(String clientVerCode) {
		this.clientVerCode = clientVerCode;
	}

	public int getAccessPhonePlatform() {
		return accessPhonePlatform;
	}

	public void setAccessPhonePlatform(int accessPhonePlatform) {
		this.accessPhonePlatform = accessPhonePlatform;
	}

	public int getServerType() {
		return serverType;
	}

	public void setServerType(int serverType) {
		this.serverType = serverType;
	}

	public String getMarkStr() {
		return markStr;
	}

	public void setMarkStr(String markStr) {
		this.markStr = markStr;
	}

	public boolean isOpenSplitFlow() {
		return openSplitFlow;
	}

	public void setOpenSplitFlow(boolean openSplitFlow) {
		this.openSplitFlow = openSplitFlow;
	}

	public int getRegisterLimit() {
		return registerLimit;
	}

	public void setRegisterLimit(int registerLimit) {
		this.registerLimit = registerLimit;
	}

	public int getOpenZsDay() {
		return openZsDay;
	}

	public void setOpenZsDay(int openZsDay) {
		this.openZsDay = openZsDay;
	}

	public boolean isCreateRoleLimit() {
		return createRoleLimit;
	}

	public void setCreateRoleLimit(boolean createRoleLimit) {
		this.createRoleLimit = createRoleLimit;
	}


	public boolean isCreatePreRoleOpen() {
		return createPreRoleOpen;
	}

	public void setCreatePreRoleOpen(boolean createPreRoleOpen) {
		this.createPreRoleOpen = createPreRoleOpen;
	}

	public int getCreatePreRoleNum() {
		return createPreRoleNum;
	}

	public void setCreatePreRoleNum(int createPreRoleNum) {
		this.createPreRoleNum = createPreRoleNum;
	}

	public int getPreRoleNum() {
		return preRoleNum;
	}

	public void setPreRoleNum(int preRoleNum) {
		if(preRoleNum != this.preRoleNum){
			this.preRoleNum = preRoleNum;
			setUpdateOption();
		}
	}

	public int getSpecialServer() {
		return specialServer;
	}

	public void setSpecialServer(int specialServer) {
		this.specialServer = specialServer;
	}

	public int getCreateRoleCountLimit() {
		return createRoleCountLimit;
	}

	public void setCreateRoleCountLimit(int createRoleCountLimit) {
		this.createRoleCountLimit = createRoleCountLimit;
	}

	public int getSpecialServerParam() {
		return specialServerParam;
	}

	public void setSpecialServerParam(int specialServerParam) {
		this.specialServerParam = specialServerParam;
	}
}
